<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
    </head>
    <body>
        <h1 id="I">开始抽奖</h1>
        <button id="st">开始</button>
        <button id="end">结束</button>

        <script>
            var I=document.getElementById('I')
            var st=document.getElementById('st')
            var end=document.getElementById('end')
            var user=['石海亮','庄智霖','郭文昊','许铭铭','邓志浩','甘权'];
            var timer;
            st.onclick=function(){
                clearInterval(timer)
               timer=setInterval(function(){
                    var n=parseInt(Math.random()*user.length);
                    I.innerHTML=user[n];
                },120)
            }
            end.onclick=function(){
                clearInterval(timer)
            }
        </script>
    </body>
</html>